package com.aerotechnic.service.implementation;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.aerotechnic.dao.implementation.MecanicienDao;
import com.aerotechnic.entities.JalonBiblio;
import com.aerotechnic.entities.Mecanicien;
import com.aerotechnic.service.interfaces.MecanicienBoInc;

@Service("MecanicienBo")
@Transactional
public class MecanicienBo implements MecanicienBoInc {
	
	@Autowired
	private MecanicienDao mecanicienDao;

	@Override
	public void save(Mecanicien myEntity) {
		// TODO Auto-generated method stub
		mecanicienDao.save(myEntity);		
	}

	@Override
	public void update(Mecanicien myEntity) {
		// TODO Auto-generated method stub
		mecanicienDao.update(myEntity);
		
	}

	@Override
	public void delete(int id) {
		// TODO Auto-generated method stub
		mecanicienDao.delete(id);
	}

	@Override
	public Mecanicien findByID(int id) {
		// TODO Auto-generated method stub
		return mecanicienDao.findByID(id);
	}

	@Override
	public List<Mecanicien> findAll() {
		// TODO Auto-generated method stub
		return mecanicienDao.findAll();
	}
	
	@Override
	public int countAllMecanicien() {
		// TODO Auto-generated method stub
		return mecanicienDao.countAllMecanicien();
	}

	@Override
	public List<Mecanicien> find(int startIndex, int pageSize) {
		// TODO Auto-generated method stub
		return mecanicienDao.find(startIndex, pageSize);
	}


}
